# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=koko
pkgver=23.08.3
pkgrel=2
pkgdesc='Image gallery application'
url='https://apps.kde.org/koko/'
arch=(loong64 x86_64)
license=(GPL LGPL)
groups=(kde-applications kde-graphics)
depends=(kirigami2 kdeclarative5 qt5-location kfilemetadata5 kquickimageeditor5)
makedepends=(extra-cmake-modules)
# update with ./download-data
source=(https://download.kde.org/stable/release-service/$pkgver/src/$pkgname-$pkgver.tar.xz{,.sig}
        https://sources.archlinux.org/other/packages/koko/cities1000-2023-07-30.zip
        https://sources.archlinux.org/other/packages/koko/admin1CodesASCII-2023-07-30.txt
        https://sources.archlinux.org/other/packages/koko/admin2Codes-2023-07-30.txt)
sha256sums=('de6ddacf3b319a2a1949f61b517a0eec113299a9c68f47643bb0ad3ccc8c6152'
            'SKIP'
            '7e79dd7c8deaa0c3cc05b61a0762149368ec78a412899d7c1b38cb4506022858'
            '52f5125b29bcf8dd864ede32f8ed81fe189bc18cd21b7e20212f15686904d102'
            'b29e85bea1b352850cb3ef04ab7c1d7df39d6467f7d2459a1748b263176ec865')
validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7  # Albert Astals Cid <aacid@kde.org>
              F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87  # Christoph Feck <cfeck@kde.org>
              D81C0CB38EB725EF6691C385BB463350D6EF31EF) # Heiko Becker <heiko.becker@kde.org>

prepare() {
  cp -L cities1000-2023-07-30.zip admin1CodesASCII-2023-07-30.txt $pkgname-$pkgver/src
}

build() {
  cmake -B build -S $pkgname-$pkgver \
    -DBUILD_TESTING=OFF
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}
